package com.fcscs.cservice.client.common.model.reservation;

import java.util.Collection;
import java.util.Map;

import com.fcscs.core.gwt.common.CoreConstants;
import com.fcscs.core.gwt.common.NonDomainModelData;
import com.fcscs.cservice.client.common.CServiceConstants;
import com.fcscs.cservice.domain.model.BillingView;
import com.fcscs.share.gwt.common.ShareGWTConstants;

public class BillingModelData extends NonDomainModelData<BillingView> {

	public BillingModelData(BillingView t) {
		super(t);
		// TODO Auto-generated constructor stub
	}

	@Override
	protected void populateNames(Collection<String> tempNames) {
		tempNames.add(ShareGWTConstants.DATE);
		tempNames.add(ShareGWTConstants.TIME);
		tempNames.add(CServiceConstants.REFERENCE);
		tempNames.add(CoreConstants.DESCRIPTION);
		tempNames.add(ShareGWTConstants.AMOUNT);
	}

	@Override
	protected void populateProps(Map<String, Object> props) {
		props.put(ShareGWTConstants.DATE, CServiceConstants.DATE_FORMAT1.format(entity.getBillingDateTime()));
		props.put(ShareGWTConstants.TIME, CServiceConstants.DATE_FORMAT2.format(entity.getBillingDateTime()));
		props.put(CServiceConstants.REFERENCE, entity.getBillingReference());
		props.put(CoreConstants.DESCRIPTION, entity.getBillingDescription());
		props.put(ShareGWTConstants.AMOUNT, entity.getBillingAmount());
	}

	@Override
	protected <X> void setProperty(String property, X value) {
		// TODO Auto-generated method stub
		
	}

}
